package com.ruoyi.basicUser.service.impl;

import java.util.List;

import com.ruoyi.basicUser.mapper.BasicUserMapper;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.basicUser.domain.BasicUser;
import com.ruoyi.basicUser.service.IBasicUserService;

/**
 * 用户管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-11
 */
@Service
public class BasicUserServiceImpl implements IBasicUserService 
{
    @Autowired
    private BasicUserMapper basicUserMapper;

    /**
     * 查询用户管理
     * 
     * @param id 用户管理主键
     * @return 用户管理
     */
    @Override
    public BasicUser selectBasicUserById(Long id)
    {
        return basicUserMapper.selectBasicUserById(id);
    }

    /**
     * 查询用户管理列表
     * 
     * @param basicUser 用户管理
     * @return 用户管理
     */
    @Override
    public List<BasicUser> selectBasicUserList(BasicUser basicUser)
    {
        return basicUserMapper.selectBasicUserList(basicUser);
    }

    /**
     * 新增用户管理
     * 
     * @param basicUser 用户管理
     * @return 结果
     */
    @Override
    public int insertBasicUser(BasicUser basicUser)
    {
        basicUser.setCreateTime(DateUtils.getNowDate());
        return basicUserMapper.insertBasicUser(basicUser);
    }

    /**
     * 修改用户管理
     * 
     * @param basicUser 用户管理
     * @return 结果
     */
    @Override
    public int updateBasicUser(BasicUser basicUser)
    {
        basicUser.setUpdateTime(DateUtils.getNowDate());
        return basicUserMapper.updateBasicUser(basicUser);
    }

    /**
     * 批量删除用户管理
     * 
     * @param ids 需要删除的用户管理主键
     * @return 结果
     */
    @Override
    public int deleteBasicUserByIds(Long[] ids)
    {
        return basicUserMapper.deleteBasicUserByIds(ids);
    }

    /**
     * 删除用户管理信息
     * 
     * @param id 用户管理主键
     * @return 结果
     */
    @Override
    public int deleteBasicUserById(Long id)
    {
        return basicUserMapper.deleteBasicUserById(id);
    }
}
